def fun(num, *args, **kwargs):
    """
    多值参数 推荐声明形参 元组用*args，字典用**kwargs
    :param num:
    :param args:
    :param kwargs:
    :return:
    """
    print(num)
    print(args)
    print(kwargs)

def demo(num, num_list):
    print('函数内部代码')
    num += num
    num_list += num_list

    print(num)
    print(num_list)
    print('函数代码完成')


if __name__ == '__main__':
    fun(1, 2, 3, 4, name="sean", age=10)
    # 推荐调用方式
    fun(1, *(2, 3, 4), **{"name": "sean", "age": 10})

    gl_num = 9
    gl_list = [1, 2, 3]
    demo(gl_num, gl_list)

    print(gl_num)
    print(gl_list)

